﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;

namespace MyServer.Udp
{
    /// <summary>
    /// 为Udp包提供信息绑定
    /// </summary>
    public class UdpPkgInfo
    {
        /// <summary>
        /// 获取本地基础Udp连接实例
        /// </summary>
        public UdpClient Client { get; private set; }
        /// <summary>
        /// 获取远端Udp连接的端点
        /// </summary>
        public IPEndPoint BindPoint { get; internal set; }
        /// <summary>
        /// 通过指定的Udp客户端实例与远端端点初始化信息实例
        /// </summary>
        /// <param name="Client">Udp客户端实例</param>
        /// <param name="Point">远端端点</param>
        public UdpPkgInfo (UdpClient Client,IPEndPoint Point)
        {
            this.Client = Client;
            this.BindPoint = Point;
        }

    }
}
